import request from '/@/utils/request'
const tablename = 'account'

export function api_datalist(params: any) {
  return request({
    url: `/${tablename}/datalist`,
    method: 'get',
    params,
  })
}

//查询回收站
export function api_recycle(params: any) {
  return request({
    url: `/${tablename}/datalist_recycle`,
    method: 'get',
    params,
  })
}
//恢复数据
export function api_recovery(params: any) {
  return request({
    url: `/${tablename}/recovery`,
    method: 'get',
    params,
  })
}
//彻底删除
export function api_com_del(params: any) {
  return request({
    url: `/${tablename}/com_del`,
    method: 'get',
    params,
  })
}
//批量恢复
export function api_recoveryChecked(data: any) {
  const res = request({
    url: `/${tablename}/recoveryChecked`,
    method: 'post',
    data,
  })
  console.log(res)
  return res
}

//批量彻底删除
export function api_com_delChecked(data: any) {
  return request({
    url: `/${tablename}/com_delChecked`,
    method: 'post',
    data,
  })
}

export function api_save(data: any) {
  return request({
    url: `/${tablename}/save`,
    method: 'post',
    data,
  })
}
export function api_del(data: any) {
  return request({
    url: `/${tablename}/del`,
    method: 'post',
    data,
  })
}
export function api_delChecked(data: any) {
  return request({
    url: `/${tablename}/delChecked`,
    method: 'post',
    data,
  })
}
export function api_detail(data: any) {
  return request({
    url: `/${tablename}/detail`,
    method: 'post',
    data,
  })
}
